'use strict';

module.exports = app => {
  const {TEXT, INTEGER, DATE } = app.Sequelize;

  const Swiper = app.model.define('swiper', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    image: {
      type: TEXT,
      allowNull: true,
      comment: '轮播图片',
    },
    created_at: DATE,
    updated_at: DATE,
  }, {
    sequelize:app.Sequelize,
    modelName: 'swiper',
    tableName: 'swiper',
    freezeTableName: true
  });

  return Swiper;
};